package interfaces;

import java.io.File;

import javax.swing.JPanel;

import engine.Lemming;

public abstract class FileListViewer extends JPanel {
	
	public File[] list = null;
	String path = "";
	
	
	public FileListViewer(String path){
		super();
		this.path = path;
		list = Lemming.explore(path);
	}
	
	public void setExplorePath(String path){
		this.path = path;
		list = Lemming.explore(path);
	}
	
	public String nowExploring() { return path; }
	
	public void run(File file){
		Lemming.run(file.getAbsolutePath());
	}
	
	public String getFileSize(File f){
		return Lemming.getFileSizeString(f.length());
	}

}
